home *** CD-ROM | disk | FTP | other *** search
Wrap
ddddmmmmDDDDVVVVIIIIAAAAuuuuddddiiiiooooEEEEnnnnccccooooddddeeee((((3333ddddmmmm)))) ddddmmmmDDDDVVVVIIIIAAAAuuuuddddiiiiooooEEEEnnnnccccooooddddeeee((((3333ddddmmmm)))) NNNNAAAAMMMMEEEE dmDVIAudioEncode - compress audio data using the IMA (Interactive Multimedia Association) Recommended ADPCM compression, based on Intel's DVI algorithm. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////ddddmmmm____aaaauuuuddddiiiioooouuuuttttiiiillll....hhhh>>>> DDDDMMMMssssttttaaaattttuuuussss ddddmmmmDDDDVVVVIIIIAAAAuuuuddddiiiiooooEEEEnnnnccccooooddddeeee((((DDDDMMMMDDDDVVVVIIIIaaaauuuuddddiiiiooooeeeennnnccccooooddddeeeerrrr hhhhaaaannnnddddlllleeee,,,, sssshhhhoooorrrrtttt ****iiiibbbbuuuuffff,,,, uuuunnnnssssiiiiggggnnnneeeedddd cccchhhhaaaarrrr ****oooobbbbuuuuffff,,,, iiiinnnntttt nnnnssssaaaammmmpppplllleeeessss)))) PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRR _h_a_n_d_l_e DDDDMMMMDDDDVVVVIIIIaaaauuuuddddiiiiooooeeeennnnccccooooddddeeeerrrr structure, created by a previous call to ddddmmmmDDDDVVVVIIIIAAAAuuuuddddiiiiooooEEEEnnnnccccooooddddeeeerrrrCCCCrrrreeeeaaaatttteeee((((3333ddddmmmm)))). It contains the state associated with the encoder. _i_b_u_f pointer to input sample data buffer. The data format is short (16-bit). The samples are assumed to be two's complement. Sampling rate could range from 8 kHz to 48 kHz. _o_b_u_f pointer to output compressed data buffer. The data format is unsigned char (8-bit). _n_s_a_m_p_l_e_s The number of samples to be processed. For the 4:1 algorithm (the only one currently supported), the value of nsamples passed to the DVI encode/decode routines must always be a multiple of 2. RRRREEEETTTTUUUURRRRNNNNEEEEDDDD VVVVAAAALLLLUUUUEEEE Returns DDDDMMMM____FFFFAAAAIIIILLLLUUUURRRREEEE or DDDDMMMM____SSSSUUUUCCCCCCCCEEEESSSSSSSS. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN ddddmmmmDDDDVVVVIIIIAAAAuuuuddddiiiiooooEEEEnnnnccccooooddddeeee((((3333ddddmmmm)))) implements Intel, Inc.'s DVI IMA4:1 ADPCM compression for monaural audio data. DVI IMA ADPCM compression exists in two forms, 4 bits per sample (IMA4:1) and 3 bits per sample (IMA3:1). The compression form may be retrieved using ddddmmmmDDDDVVVVIIIIAAAAuuuuddddiiiiooooDDDDeeeeccccooooddddeeeerrrrGGGGeeeettttPPPPaaaarrrraaaammmmssss((((3333ddddmmmm)))) via the parameter DDDDMMMM____DDDDVVVVIIII____AAAAUUUUDDDDIIIIOOOO____BBBBIIIITTTTSSSS____PPPPEEEERRRR____SSSSAAAAMMMMPPPPLLLLEEEE. Its possible values are: DDDDMMMM____DDDDVVVVIIII____AAAAUUUUDDDDIIIIOOOO____4444BBBBIIIITTTTSSSS____PPPPEEEERRRR____SSSSAAAAMMMMPPPPLLLLEEEE 4:1 compression. This is the only form currently supported by the SGI Digital Media libraries. PPPPaaaaggggeeee 1111 ddddmmmmDDDDVVVVIIIIAAAAuuuuddddiiiiooooEEEEnnnnccccooooddddeeee((((3333ddddmmmm)))) ddddmmmmDDDDVVVVIIIIAAAAuuuuddddiiiiooooEEEEnnnnccccooooddddeeee((((3333ddddmmmm)))) DDDDMMMM____DDDDVVVVIIII____AAAAUUUUDDDDIIIIOOOO____3333BBBBIIIITTTTSSSS____PPPPEEEERRRR____SSSSAAAAMMMMPPPPLLLLEEEE 3:1 compression. Currently not supported. DDDDVVVVIIII AAAAUUUUDDDDIIIIOOOO FFFFIIIILLLLEEEE BBBBLLLLOOOOCCCCKKKK MMMMOOOODDDDEEEE DVI audio compression uses a linear prediction scheme. This means that the compressed bits are interrelated or interdependent. If a application seeks to an offset into the compressed bit stream file and then starts reading at that point in the stream and decompresses it via ddddmmmmDDDDVVVVIIIIAAAAuuuuddddiiiiooooDDDDeeeeccccooooddddeeee((((3333ddddmmmm)))), the interdependency of the bits at the start point is lost. The application will initially get back data with a lower amplitude than if he had read the same data back during a complete pass over the file from the beginning. In pure DVI ADPCM data, there is no way to accurately begin decoding data in the middle of the bit stream file without starting the beginning. Two solutions to this problem have been developed, one by Intel, Inc. and one by Apple, Inc. Both involve breaking the compressed data up into blocks, each with a small header encapsulating the information needed to allow decoding to begin at any block boundry with no loss of data. WWWWAAAAVVVVEEEE(4) and AAAAIIIIFFFFFFFF----CCCC format sound files using IMA DVI compression take advantage of this block method if you create them using the Audio File Library. In addition, a block method compressed stream may be created using ddddmmmmAAAACCCCCCCCoooonnnnvvvveeeerrrrtttt(3dm) if it is configured properly. CCCCOOOONNNNFFFFIIIIGGGGUUUURRRRIIIINNNNGGGG DDDDMMMMAAAACCCC FFFFOOOORRRR BBBBLLLLOOOOCCCCKKKK MMMMOOOODDDDEEEE Three parameters are needed to configure the DDDDMMMMaaaauuuuddddiiiiooooccccoooonnnnvvvveeeerrrrtttteeeerrrr to allow creation of these block streams: DDDDMMMM____AAAAUUUUDDDDIIIIOOOO____CCCCOOOODDDDEEEECCCC____MMMMAAAAXXXX____BBBBYYYYTTTTEEEESSSS____PPPPEEEERRRR____BBBBLLLLOOOOCCCCKKKK Indicates the number of bytes of compressed data per block, including the header. Indicates the number of bytes of compressed data per block, including the header. For AAAAIIIIFFFFFFFF----CCCC(4) files, this value is always 34 * channel_count. For WWWWAAAAVVVVEEEE(4) files, this value varies. DDDDMMMM____AAAAUUUUDDDDIIIIOOOO____CCCCOOOODDDDEEEECCCC____FFFFRRRRAAAAMMMMEEEESSSS____PPPPEEEERRRR____BBBBLLLLOOOOCCCCKKKK Indicates the number of frames of uncompressed data contained in each block. Indicates the number of frames of uncompressed data contained in each block. For AAAAIIIIFFFFFFFF----CCCC(4) files, this value is always 64. For WWWWAAAAVVVVEEEE(4) files, this value varies. DDDDMMMM____DDDDVVVVIIII____AAAAUUUUDDDDIIIIOOOO____BBBBLLLLOOOOCCCCKKKK____TTTTYYYYPPPPEEEE This DVI-specific parameter specifies whether the data will be compressed using the Intel scheme, the Apple scheme, or no blocking at all (i.e., "pure" DVI). Its possible values are: DDDDMMMM____DDDDVVVVIIII____AAAAUUUUDDDDIIIIOOOO____BBBBLLLLOOOOCCCCKKKK____TTTTYYYYPPPPEEEE____NNNNOOOONNNNEEEE -- For stream use only. DDDDMMMM____DDDDVVVVIIII____AAAAUUUUDDDDIIIIOOOO____BBBBLLLLOOOOCCCCKKKK____TTTTYYYYPPPPEEEE____AAAAPPPPPPPPLLLLEEEE -- For AIFF-C files. DDDDMMMM____DDDDVVVVIIII____AAAAUUUUDDDDIIIIOOOO____BBBBLLLLOOOOCCCCKKKK____TTTTYYYYPPPPEEEE____IIIINNNNTTTTEEEELLLL -- For WAVE files. PPPPaaaaggggeeee 2222 ddddmmmmDDDDVVVVIIIIAAAAuuuuddddiiiiooooEEEEnnnnccccooooddddeeee((((3333ddddmmmm)))) ddddmmmmDDDDVVVVIIIIAAAAuuuuddddiiiiooooEEEEnnnnccccooooddddeeee((((3333ddddmmmm)))) IIIIMMMMPPPPOOOORRRRTTTTAAAANNNNTTTT NNNNOOOOTTTTEEEE Stereo audio streams and streams with block data _c_a_n_n_o_t be created using ddddmmmmDDDDVVVVIIIIAAAAuuuuddddiiiiooooEEEEnnnnccccooooddddeeee(((()))) directly -- you must use ddddmmmmAAAACCCCCCCCoooonnnnvvvveeeerrrrtttt(3dm). It is highly recommended that the Audio File Library be used for all to- and from-disk compression and decompression. SSSSEEEEEEEE AAAALLLLSSSSOOOO dmDVIAudioEncoderCreate(3dm), dmDVIAudioEncoderSetParams(3dm), dmDVIAudioEncoderDestroy(3dm), dmDVIAudioEncode(3dm), dnACConvert(3dm), afWriteFrames(3dm), IMA Recommended Practices for Enhancing Digital Audio Compatibility in Multimedia Systems, rev 3.00. PPPPaaaaggggeeee 3333